package org.example.howto;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

public class Java8ConvertIterableToStream {
    public static void main(String[] args) {
        Iterable<Integer> iterable = Arrays.asList(1,2,3,4,5);
        List<Integer> result = StreamSupport.stream(iterable.spliterator(),false)
                .map(x -> x * 10)
                .collect(Collectors.toList());
        result.forEach(System.err::println);
    }
}
